﻿#ifndef FRIENDLISTWIDGET_H
#define FRIENDLISTWIDGET_H

#include <QWidget>
#include <QMenu>
#include "friendlistitem.h"

namespace Ui {
class FriendListWidget;
}

class FriendListWidget : public QWidget
{
    Q_OBJECT

public:
    explicit FriendListWidget(QWidget *parent = nullptr);
    ~FriendListWidget();

    void addFriendList(QStringList avatarList,QStringList MsgList,QStringList usrNameList,QStringList msgNumList,QStringList timeList);
    void setFriendInfo(QString avatar,QString Msg,QString usrName,QString msgNum, QString time);


private:
    Ui::FriendListWidget *ui;
    QMenu* contextMenu = NULL;
    QAction* actionDelete = NULL;
    QAction* actionMute = NULL;

    QList<FriendListItem*>  mList_pFriendItem;


private slots:
    void slot_showContextMenu(const QPoint &pos);
    void deleteFriend();
    void muteFriend();
    void on_pbn_AddFriend_clicked();
};

#endif // FRIENDLISTWIDGET_H
